package com.evon.yardmanagement.model;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "CAR_DETAILS")
@AttributeOverride(name = "id", column = @Column(name = "CAR_ID"))
public class Car extends BaseModel implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name = "CAR_NUMBER")
	private String carNumber;

	@ManyToOne
	@JoinColumn(name="CAR_MANUFACTURER")
	private Oem oem;

	@Column(name = "FUEL_VARIENT")
	private String carVerient;

	@Column(name = "CAR_MODEL")
	private String carModel;

	@Column(name = "CHASIS_NUMBER")
	private String carChasisNumber;

	@Column(name = "COLOR")
	private String carColor;

	@Column(name = "KEY_NUMBER")
	private int keyNumber;

	//
	@ManyToOne
	@JoinColumn(name="PARKING_SLOT_ID",referencedColumnName="SLOT_ID")
	private ParkingSlot parkingSlot;

	@ManyToOne
	@JoinColumn(name="KEY_BOX_ID",referencedColumnName="KEY_BOX_ID")
	private KeyBox keyBox;

	@ManyToOne
	@JoinColumn(name="PARKING_DRIVER_ID")
	private Member parkingDriver;

	@Column(name = "PARKING_DATE_TIME")
	private Date parkingTime;

	@ManyToOne
	@JoinColumn(name="RETRIEVAL_DRIVER_ID",referencedColumnName="MEMBER_ID")
	private Member retrievalDriver;

	@Column(name = "RETRIEVAL_DATE_TIME")
	private Date retrievalTime;

	@Column(name = "RETRIEVAL_FLAG")
	private char retrievalFlag;

	@Column(name = "PARKING_STATUS")
	private String parkingStatus;

	@ManyToOne
	@JoinColumn(name="TRANSPORTER_ID",referencedColumnName="ID")
	private Transporter transporter;
	
	@Column(name="YARD_ID")
	private int yardId;

	public String getCarNumber() {
		return carNumber;
	}

	public void setCarNumber(String carNumber) {
		this.carNumber = carNumber;
	}


	public String getCarVerient() {
		return carVerient;
	}

	public void setCarVerient(String carVerient) {
		this.carVerient = carVerient;
	}

	public String getCarModel() {
		return carModel;
	}

	public void setCarModel(String carModel) {
		this.carModel = carModel;
	}

	public String getCarChasisNumber() {
		return carChasisNumber;
	}

	public void setCarChasisNumber(String carChasisNumber) {
		this.carChasisNumber = carChasisNumber;
	}

	public String getCarColor() {
		return carColor;
	}

	public void setCarColor(String carColor) {
		this.carColor = carColor;
	}

	public int getKeyNumber() {
		return keyNumber;
	}

	public void setKeyNumber(int keyNumber) {
		this.keyNumber = keyNumber;
	}

	public ParkingSlot getParkingSlot() {
		return parkingSlot;
	}

	public void setParkingSlot(ParkingSlot parkingSlot) {
		this.parkingSlot = parkingSlot;
	}

	public KeyBox getKeyBox() {
		return keyBox;
	}

	public void setKeyBox(KeyBox keyBox) {
		this.keyBox = keyBox;
	}

	public Member getParkingDriver() {
		return parkingDriver;
	}

	public void setParkingDriver(Member parkingDriver) {
		this.parkingDriver = parkingDriver;
	}

	public Date getParkingTime() {
		return parkingTime;
	}

	public void setParkingTime(Date parkingTime) {
		this.parkingTime = parkingTime;
	}

	public Member getRetrievalDriver() {
		return retrievalDriver;
	}

	public void setRetrievalDriver(Member retrievalDriver) {
		this.retrievalDriver = retrievalDriver;
	}

	public Date getRetrievalTime() {
		return retrievalTime;
	}

	public void setRetrievalTime(Date retrievalTime) {
		this.retrievalTime = retrievalTime;
	}

	public char getRetrievalFlag() {
		return retrievalFlag;
	}

	public void setRetrievalFlag(char retrievalFlag) {
		this.retrievalFlag = retrievalFlag;
	}

	public String getParkingStatus() {
		return parkingStatus;
	}

	public void setParkingStatus(String parkingStatus) {
		this.parkingStatus = parkingStatus;
	}

	public Transporter getTransporter() {
		return transporter;
	}

	public void setTransporter(Transporter transporter) {
		this.transporter = transporter;
	}


	public int getYardId() {
		return yardId;
	}

	public void setYardId(int yardId) {
		this.yardId = yardId;
	}

	public Oem getOem() {
		return oem;
	}

	public void setOem(Oem oem) {
		this.oem = oem;
	}

}
